<%@ page import="sar.TeachingSession" %>



<div class="fieldcontain ${hasErrors(bean: teachingSessionInstance, field: 'name', 'error')} required">
	<label for="name">
		<g:message code="teachingSession.name.label" default="Name" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="name" required="" value="${teachingSessionInstance?.name}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: teachingSessionInstance, field: 'content', 'error')} required">
	<label for="content">
		<g:message code="teachingSession.content.label" default="Content" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="content" required="" value="${teachingSessionInstance?.content}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: teachingSessionInstance, field: 'time', 'error')} required">
	<label for="time">
		<g:message code="teachingSession.time.label" default="Time" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="time" precision="minute"  value="${teachingSessionInstance?.time}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: teachingSessionInstance, field: 'type', 'error')} ">
	<label for="type">
		<g:message code="teachingSession.type.label" default="Type" />
		
	</label>
	<g:select name="type" from="${teachingSessionInstance.constraints.type.inList}" value="${teachingSessionInstance?.type}" valueMessagePrefix="teachingSession.type" noSelection="['': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: teachingSessionInstance, field: 'programCourse', 'error')} required">
	<label for="programCourse">
		<g:message code="teachingSession.programCourse.label" default="Program Course" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="programCourse" name="programCourse.id" from="${sar.ProgramCourse.list()}" optionKey="id" required="" value="${teachingSessionInstance?.programCourse?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: teachingSessionInstance, field: 'staff', 'error')} required">
	<label for="staff">
		<g:message code="teachingSession.staff.label" default="Staff" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="staff" name="staff.id" from="${sar.Staff.list()}" optionKey="id" required="" value="${teachingSessionInstance?.staff?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: teachingSessionInstance, field: 'tutor', 'error')} required">
	<label for="tutor">
		<g:message code="teachingSession.tutor.label" default="Tutor" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="tutor" name="tutor.id" from="${sar.Tutor.list()}" optionKey="id" required="" value="${teachingSessionInstance?.tutor?.id}" class="many-to-one"/>
</div>

